/*
 * Project: BoboDesignPattern
 * 
 * File Created at 2019年3月11日
 * 
 * Copyright 2012 Greenline.com Corporation Limited.
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * Greenline Company. ("Confidential Information").  You shall not
 * disclose such Confidential Information and shall use it only in
 * accordance with the terms of the license agreement you entered into
 * with Greenline.com.
 */
package builder.test2;

/**
 * @Type ConcrereDirctor
 * @Desc
 * @author 52489
 * @date 2019年3月11日
 * @Version V1.0
 */
public class ConcrereDirctor implements AirShipDirctor {

    private AirShipBuilder airShipBuilder;

    /**
     * @param airShipBuilder
     */
    public ConcrereDirctor(AirShipBuilder airShipBuilder) {
        super();
        this.airShipBuilder = airShipBuilder;
    }

    /*
     * (non-Javadoc)
     * 
     * @see builder.test2.AirShipDirctor#dirctorAirShip()
     */
    @Override
    public AirShip dirctorAirShip() {
        Engine engine = airShipBuilder.buildEngine();
        OrbitalMoudle orbitalMoudle = airShipBuilder.buildOrbitalMoudle();
        ScapeTower scapeTower = airShipBuilder.buildScapeTower();
        AirShip airShip = new AirShip();
        airShip.setEngine(engine);
        airShip.setOrbitalMoudle(orbitalMoudle);
        airShip.setScapeTower(scapeTower);
        return airShip;
    }

}
